package com.jair.jairaiagent.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.jair.jairaiagent.common.config.ApiConfig;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping
@Tag(name = "Student Controller",description ="我是一个测试")
@AllArgsConstructor
public class studentController {

    private final ApiConfig apiConfig;

    @GetMapping("/hello")
    @ApiOperationSupport(order = 1)
    @Operation(summary = "Hello World",description = "这是测试")
    public String hello() {
        log.info("Hello World!");
        log.info("api key: {}",apiConfig.getApiKey());
        return "Hello World!";
    }
}
